﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data;

namespace WebApplication1
{
    public partial class Task_Info_Caller : System.Web.UI.Page
    {
        string Flag = "";
        string EQName = "";
        string EQType = "";
        string EQFnr = "";
        string EQFac = "";
        string BuyDate = "";
        string Dept = "";
        string loc = "";
        string caller = "";
        string callerPhone = "";
        string callTime = "";
        string TaskContent = "";
        string Progress = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            Flag = Request["Flag"].Trim().ToString();
            DBS md = new DBS();

            DataSet ds = new DataSet();
            DataSet ds2 = new DataSet();
            DataSet ds3 = new DataSet();
            ds = md.TaskInfo(Flag);
            if (ds.Tables[0].Rows.Count > 0)
            {
                EQName = ds.Tables[0].Rows[0][0].ToString();
                EQType = ds.Tables[0].Rows[0][1].ToString();
                EQFnr = ds.Tables[0].Rows[0][2].ToString();
                EQFac = ds.Tables[0].Rows[0][3].ToString();
                BuyDate = ds.Tables[0].Rows[0][4].ToString();
                Dept = ds.Tables[0].Rows[0][9].ToString() + " " + ds.Tables[0].Rows[0][5].ToString();
                loc = ds.Tables[0].Rows[0][8].ToString();
                caller = ds.Tables[0].Rows[0][10].ToString();
                callerPhone = ds.Tables[0].Rows[0][11].ToString();
                callTime = ds.Tables[0].Rows[0][12].ToString();
                TaskContent = ds.Tables[0].Rows[0][13].ToString();
                Progress = ds.Tables[0].Rows[0][14].ToString();
            }
            ds2 = md.Task_Image_List(Flag);
            this.Repeater1.DataSource = ds2;
            this.Repeater1.DataBind();
            ds3 = md.Task_Log_List(Flag);
            this.Repeater2.DataSource = ds3;
            this.Repeater2.DataBind();

        }



        public string GetTaskProgress()
        {
            return Progress;
            //////


        }
        public string GetTaskContent()
        {
            return TaskContent;
            //////


        }
        public string GetcallTime()
        {
            return callTime;
            //////


        }
        public string Getcaller()
        {
            return caller;
            //////


        }
        public string GetcallerPhone()
        {
            return callerPhone;
            //////


        }

        public string Getloc()
        {
            return loc;
            //////


        }
        public string GetEQName()
        {
            return EQName;
            //////


        }
        public string GetEQType()
        {
            return EQType;
            //////


        }
        public string GetEQFnr()
        {
            return EQFnr;
            //////


        }
        public string GetEQFac()
        {
            return EQFac;
            //////


        }
        public string GetBuyDate()
        {
            return BuyDate;
            //////


        }

        public string GetDept()
        {
            return Dept;
            //////


        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            MedEq me = new MedEq();
            me.Change_Task_State(Flag, "收到任务");
        }



    }
}